package com.laundry.dto;

import jakarta.validation.constraints.NotBlank;
<<<<<<< HEAD
import lombok.Data;

@Data
=======

>>>>>>> c61637f (所有前后端正常登录)
public class LoginRequest {
    
    @NotBlank(message = "用户名不能为空")
    private String username;
    
    @NotBlank(message = "密码不能为空")
    private String password;
<<<<<<< HEAD
}
=======
    
    // 默认构造函数
    public LoginRequest() {
    }
    
    // 全参数构造函数
    public LoginRequest(String username, String password) {
        this.username = username;
        this.password = password;
    }
    
    // Getter和Setter方法
    public String getUsername() {
        return username;
    }
    
    public void setUsername(String username) {
        this.username = username;
    }
    
    public String getPassword() {
        return password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    // equals方法
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        
        LoginRequest that = (LoginRequest) o;
        
        if (username != null ? !username.equals(that.username) : that.username != null) return false;
        return password != null ? password.equals(that.password) : that.password == null;
    }
    
    // hashCode方法
    @Override
    public int hashCode() {
        int result = username != null ? username.hashCode() : 0;
        result = 31 * result + (password != null ? password.hashCode() : 0);
        return result;
    }
    
    // toString方法
    @Override
    public String toString() {
        return "LoginRequest{" +
                "username='" + username + '\'' +
                ", password='" + "******" + '\'' +  // 不显示密码
                '}';
    }
}
>>>>>>> c61637f (所有前后端正常登录)
